package com.zjeav.lingjiao.base.baseBean;

import android.content.Context;
import android.os.Build;
import android.support.annotation.RequiresApi;

import com.zjeav.lingjiao.base.tools.SystemTools;

public class DeviceInfo {
    String platform;//	操作系统信息	iOS 3.2，Android 6.1
    String uuid;    //设备UUID
    String manufacturer;    //厂商
    String appversion;
    String name;

    public static DeviceInfo instance;
    private DeviceInfo(){}
    public static DeviceInfo getInstance(Context context){
        if (instance == null) {
            instance = new DeviceInfo();
            instance.setPlatform(SystemTools.getSystemVersion());
            instance.setAppversion(SystemTools.getAppVersionName(context));
            instance.setUuid(SystemTools.getUniqueId(context));
            instance.setManufacturer(SystemTools.getDeviceBrand());
            instance.setName(SystemTools.getDeviceName());
        }
        return instance;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static DeviceInfo getInstance() {
        return instance;
    }

    public static void setInstance(DeviceInfo instance) {
        DeviceInfo.instance = instance;
    }

    public String getPlatform() {
        return platform;
    }

    public void setPlatform(String platform) {
        this.platform = platform;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getManufacturer() {
        return manufacturer;
    }

    public void setManufacturer(String manufacturer) {
        this.manufacturer = manufacturer;
    }

    public String getAppversion() {
        return appversion;
    }

    public void setAppversion(String appversion) {
        this.appversion = appversion;
    }
}
